package hello.controller.fuga;

import java.util.ArrayList;
import java.util.Arrays;

import hello.service.BakaService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

public class RemoveCommentController extends Controller {

    @Override
    public Navigation run() throws Exception {
        Boolean isOk = BakaService.getInstance().verifyRequestParameter(this.request, Arrays.asList("user_id", "entry_id"));
        if(!isOk){
            
        }
        String userId = this.request.getParameter("user_id");
        String entryId = this.request.getParameter("entry_id");

        try{
            BakaService.getInstance().removeComment(userId, entryId);
        }
        catch(Exception ex){
            
        }
        this.response.getWriter().print("__SUCCESS__");
        return null;
    }
}
